<script setup>
import { ref } from 'vue';
import { RouterLink,RouterView } from 'vue-router';

</script>

<template>
  <div class="container">
    <!-- 上方按钮 -->
    <div class="button-group">
      <router-link to="/1" active-class="nav-button">区域1</router-link>
      <router-link to="/2" active-class="nav-button">区域2</router-link>
      <router-link to="/3" active-class="nav-button">区域3</router-link>
    </div>

    <!-- 下方展示区域 -->
    <div class="content-display">
      <RouterView />
    </div>
  </div>
</template>

<style scoped>
.container {
  padding: 20px;
  font-family: Arial, sans-serif;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: #42b983;
  color: white;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #369c6b;
}

.content-display {
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f9f9f9;
  text-align: center;
  min-height: 100px;
}

.nav-button {
  padding: 10px 20px;
  font-size: 16px;
  color: white;
  text-decoration: none;
  background-color: #42b983;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.nav-button:hover {
  background-color: #369c6b;
}
</style>